import random

def generate_case(n_range=(5, 10), max_step=5):
    """生成单个测试用例"""
    n = random.randint(*n_range)
    nums = [random.randint(0, max_step) for _ in range(n)]
    # 确保最后一个元素为0（终点）
    nums[-1] = 0
    return nums

def generate_test_cases(num_cases=10, **kwargs):
    """生成多个测试用例"""
    return [generate_case(**kwargs) for _ in range(num_cases)]

if __name__ == "__main__":
    # 生成10个测试用例并打印
    test_cases = generate_test_cases(10)
    for i, case in enumerate(test_cases):
        print(f"测试用例 {i+1}: {case}")